-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Mox.deny/3
#146
Add Mox.deny/3
#146
Conversation
|
||
reject(MockWeatherAPI, :get_temp, 1) | ||
""" | ||
@doc since: "1.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing next version number here (not sure if this or 1.1.1
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's this per SemVer 👍
I’m confused by a couple of things:
|
|
(accidentally closed from mobile finger slip) |
Sorry, I had a change of mind and I think we should call it In any case, I am waiting on @whatyouhide's acceptance. :D |
Allow denying a call to a mock with clearer intentions. Closes dashbitco#145.
Renamed to |
Right, but this doesn't explain why we need to pass a function in, rather than the arity as an integer only. I see the function as more confusing than useful? |
Maybe I'm missing your point, |
Man I gotta be honest I didn't even look at the code. I was discussing out of #145, which showed this code # Passing a fun
refute(MockWeatherAPI, :get_temp, fn _ -> {:ok, 30} end) 🤦 Sorry! |
|
||
reject(MockWeatherAPI, :get_temp, 1) | ||
""" | ||
@doc since: "1.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's this per SemVer 👍
💚 💙 💜 💛 ❤️ |
Mirror new function in Mox (see dashbitco/mox#146). Bump minimimum Mox version to ~> 1.2 since the function is included from the 1.2.0 release onwards.
Allow denying a call to a mock with clearer intentions.
Closes #145.